<script setup>
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import 'dayjs/locale/zh-cn';
import { legacyLogicalPropertiesTransformer } from 'ant-design-vue';
import { theme } from 'ant-design-vue';
import { ref } from 'vue';

import { useThemeStore } from '@/store/theme';
import { storeToRefs } from 'pinia';

const themeStore = useThemeStore();
const { themeConfig } = storeToRefs(themeStore);
</script>

<template>
  <a-config-provider :locale="zhCN" :theme="themeConfig">
    <a-style-provider
      hash-priority="high"
      :transformers="[legacyLogicalPropertiesTransformer]"
    >
      <a-app>
        <RouterView />
      </a-app>
    </a-style-provider>
  </a-config-provider>
</template>

<style scoped lang="scss"></style>
